package com.ae.shield.client.events;

import com.ae.shield.ModLib;
import com.ae.shield.common.items.ColorItem;
import com.ae.shield.common.items.ItemList;
import net.minecraft.client.renderer.color.IItemColor;
import net.minecraft.client.renderer.color.ItemColors;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.RegistryKey;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.client.event.ColorHandlerEvent;
import net.minecraftforge.client.model.BakedItemModel;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.RegistryObject;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.registries.ForgeRegistries;

import java.util.Collection;
import java.util.Map;
import java.util.Set;

@Mod.EventBusSubscriber(modid = ModLib.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
public class ItemColor {

    @SubscribeEvent
    public static void ChangeColor(ColorHandlerEvent.Item event) {
        ItemColors colors = event.getItemColors();
        ItemList.COLOR.forEach((i) -> colors.register((s, i1) -> ((ColorItem) i.get()).getColor(), i.get()));
    }

    public static void saa(BakedItemModel event) {
    }
}
